home *** CD-ROM | disk | FTP | other *** search
/ TPUG - Toronto PET Users Group / TPUG Users Group CD / TPUG Users Group CD.iso / C64 / H-Graphics / (c)h4.d64 / Kkoala simon (.txt) < prev    next >
Commodore BASIC  |  2007-02-04  |  7KB  |  197 lines

  1. 5 REM *********************************       *                               *
  2. 10 REM*          KOALA SIMON          *       *               BY              *
  3. 15 REM*         ROGER D. BURGE        *       *           TPUG #2667          *
  4. 20 REM* TORONTO PET USERS GROUP INC.  *       *        TORONTO, CANADA        *
  5. 25 REM*      FOR THE COMMODORE 64     *       *          & KOALA PAD          *
  6. 30 REM* (TM.)KOALA TECHNOLOGIES CORP. *       *   VERSION 1.0/ AUGUST, 1984   *
  7. 35 REM*    CATEGORY: RECREATIONAL,    *       *              EDUCATIONAL      *
  8. 40 REM*                               *       *********************************
  9. 45 CLR:GOSUB320:GOSUB215:GOSUB690:GOSUB360
  10. 50 GOSUB640
  11. 55 PC=1:P(1)=1:P(2)=1
  12. 60 PRINT"[158]"P$(PC)T$:FORT=.TO250:NEXT:NU=.
  13. 65 FORT=.TOWT*6:NEXT
  14. 70 PRINTS$(PC):GOSUB175
  15. 75 PRINT""S$(PC):AN$(PC)="":FORJ=1TONU:TI$="000000"
  16. 80 PRINTP$(.)MID$(TI$,5);"":IFTI>TLTHENJ=NU:GOSUB615:GOTO135
  17. 85 SYS820:IFPEEK(252)<7THENSP=.:GOTO95
  18. 90 SP=INT((PEEK(252)-7)/63.75)+1
  19. 95 POKEV+1,AP(SP)
  20. 100 SYS820:IFPEEK(253)=.ORSP=.THEN80
  21. 105 AN$(PC)=AN$(PC)+CHR$(SP)
  22. 110 IFAN$(PC)<>LEFT$(P$(PC+2),J)THENJ=NU:GOSUB625:GOTO135
  23. 115 GOSUB200:IFJ-1=S(PC)THENS(PC)=S(PC)+1:PRINTS$(PC)S(PC)
  24. 120 IFS(PC)=128THENNU=NU-1:H(PC)=128:GOSUB945:GOTO140
  25. 125 IFS(PC)>H(PC)THENH(PC)=S(PC):PRINTS$(PC+2)H(PC)
  26. 130 NEXT:POKEV+1,AP(.):GOTO65
  27. 135 PRINT"[158]"P$(PC)"[157][157][157][157][157][157][157][157][157][157]  SORRY!  ":NU=NU-1:FORT=.TO1499:NEXT
  28. 140 POKEV+1,AP(.):GOSUB175:IFP+PC=3THENPRINTLEFT$(C$(.),Z)SPC(20)"[153] TRADE PAD "
  29. 145 FORT=.TO2999:NEXT:IFP=2THENPRINTLEFT$(C$(.),Z)SPC(20)"              "
  30. 150 IFS(PC)<128THENPRINT""P$(PC)"[157][157][157][157][157][157][157][157][157][157][146]          "
  31. 155 IFP=1THENGOTO535
  32. 160 IFP=2THENPRINT""P$(PC)"[146]"S$(PC):P(PC)=.:PC=PC+1:IFPC=3THENPC=1
  33. 165 IFP(PC)=.THEN535
  34. 170 GOTO60
  35. 175 NU=NU+1:FORU=1TONU:PRINTG$(ASC(MID$(P$(PC+2),U)))
  36. 180 POKES+1,15+ASC(MID$(P$(PC+2),U))^2.7:POKES+4,17
  37. 185 POKEV+1,AP(ASC(MID$(P$(PC+2),U)))
  38. 190 FORT=.TODU:NEXT:POKES+4,.:PRINTF$(ASC(MID$(P$(PC+2),U)))
  39. 195 FORTT=.TOWT:NEXT:NEXT:POKEV+1,AP(.):RETURN
  40. 200 PRINTG$(SP)
  41. 205 POKES+1,15+(SP)^2.7:POKES+4,17:FORT=.TODU:NEXT:POKES+4,.
  42. 210 PRINTF$(SP):FORT=.TOWT:NEXT:RETURN
  43. 215 C$(1)="[158]":C$(2)="[153]":C$(3)="[159]":C$(4)="[150]":C$(.)=""
  44. 220 C=2:FORT=1TO4
  45. 225 F$(T)=" [213][192][201] [157][157][157][157][157] [221]K[221] [157][157][157][157][157] [202][192][203] "
  46. 230 C=C+4:F$(T)=LEFT$(C$(.),C)+F$(T):G$(T)=F$(T)
  47. 235 F$(T)=C$(T)+F$(T):G$(T)=""+G$(T):NEXT
  48. 240 F$(.)="[146][176][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][174]"
  49. 245 F$(.)=F$(.)+"[221][155]             KOALA  SIMON             [146][221]"
  50. 250 F$(.)=F$(.)+"[171][192][192][192][192][192][192][192][192][192][192][192][192][192][178][192][192][192][192][192][192][192][192][192][192][178][192][192][192][192][192][192][192][192][192][192][192][192][192][179]"
  51. 255 G$(.)="[147][146][171][192][192][192][192][192][192][192][192][192][192][192][192][192][177][192][192][192][192][192][192][192][192][192][192][177][192][192][192][192][192][192][192][192][192][192][192][192][192][179]"
  52. 260 G$(.)=G$(.)+ "[221][155]          BY  ROGER D. BURGE          [146][221]"
  53. 265 P$(.)="":N$(.)=""+LEFT$(P$(.),14)+"[221]"
  54. 270 P$(1)=LEFT$(C$(.),7)+P$(.)+" PLAYER 1:"
  55. 275 P$(2)=LEFT$(C$(.),15)+P$(.)+" PLAYER 2:"
  56. 280 N$(1)="":N$(2)="":N$(3)="":N$(4)=""
  57. 285 S$(1)=LEFT$(C$(.),11)+" SCORE:"
  58. 290 S$(2)=LEFT$(C$(.),19)+" SCORE:"
  59. 295 S$(3)=""+LEFT$(C$(.),9)+" HIGH: "
  60. 300 S$(4)=""+LEFT$(C$(.),17)+" HIGH: ":S$(.)=""
  61. 305 T$=C$(.)+"[146][213][192][192][192][192][192][192][192][192][192][192][201][157][157][157][157][157][157][157][157][157][157][157][157][221][155] TIMER:00 [146][221]"
  62. 310 P$(.)=LEFT$(T$,72)
  63. 315 RETURN
  64. 320 DIMC$(4),F$(4),G$(4),P$(4),N$(4),S$(4),S(2),H(2),P(2),AP(4)
  65. 325 T=RND(-TI):V=53248:VC=V+39:VX=V+17:Z=13
  66. 330 POKEV+39,1:POKEV+16,.:POKEV+23,.:POKEV+29,1:POKEV+28,.:POKE2040,14
  67. 335 FORT=.TO26:READTT:POKE896+T,TT:NEXT:FORT=27TO63:POKE896+T,.:NEXT
  68. 340 POKEV+21,.
  69. 345 FORT=820TO870:READA:POKET,A:NEXT
  70. 350 AP(.)=145:AP(1)=97:AP(2)=129:AP(3)=162:AP(4)=194
  71. 355 RETURN
  72. 360 POKEVX+16,1:POKEVX+15,1:GOSUB470
  73. 365 PRINTS$(.);"[194]UTTON #1: [201]NSTRUCTIONS
  74. 370 [153]"PEEKUTTON #2: (null)LAY (null)OALA (null)IMON
  75. 375 PRINT"[194]UTTON #1 + #2: [210]ETURN TO MENU
  76. 380 [129]T[178].[164]333:[158]820:[130]:BS[178][194](253):[139]BS[178].[167]380[178].[167]380
  77. 385 [145]BS[137]805,390,970
  78. 390 [141]470:[153]S$(.);"         LEFT$OW MANY PLAYERS?
  79. 395 PRINTSPC(Z)"[194]UTTON #1: ONE":PRINTSPC(13)"[194]UTTON #2: TWO
  80. 400 [129]T[178].[164]250:[130]
  81. 405 [141]940:P[178]BS:[139]P[179]1[176]P[177]2[167]405
  82. 410 P[178][194](253)
  83. 415 [141]470:[153]S$(.)"(null)KILL LEVEL?
  84. 420 PRINTSPC(10)"[194]UTTON #1: LEVEL ONE
  85. 425 [153][166]10)"PEEKUTTON #2: LEVEL TWO
  86. 430 FORT=.TO250:NEXT
  87. 435 GOSUB940:L=BS:IFL<1ORL>2THEN435
  88. 440 L=L-1
  89. 445 N$(.)=LEFT$(N$(.),20)+"[155] LEVEL: "+MID$(STR$(L+1),2)+" [146][221][157][157][157][157][157][157][157][157][157][157][157][157]"
  90. 450 N$(.)=N$(.)+"[202][192][192][192][192][192][192][192][192][192][192][203]"
  91. 455 IFLTHENDU=375:WT=50:TL=180:GOTO465
  92. 460 DU=750:WT=99:TL=300
  93. 465 POKEVX+16,.:POKEVX+15,.:PRINT"[142]":RETURN
  94. 470 POKEVX,PEEK(VX)AND239:PRINT"[147]";:POKEV+21,.
  95. 475 PRINT"[176][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][174]";
  96. 480 PRINT"[221]              [203][207][193][204][193] [211][201][205][207][206]             [221]";
  97. 485 PRINT"[221]          BY  [210]OGER [196]. [194]URGE          [221]";
  98. 490 PRINT"[171][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][179]";
  99. 495 FORT=.TO14:PRINT"[221]";SPC(38)"[221]";:NEXT
  100. 500 PRINT"[171][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][179]";
  101. 505 PRINT"[221][144][146]  *[212][205] [203]OALA [212]ECHNOLOGIES [195]ORPORATION  [221]";
  102. 510 PRINT"[173][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][189]";
  103. 515 PRINT"[157][148][148]":POKE218,132
  104. 520 PRINT"[144][176][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][174]";
  105. 525 PRINT"[221] [193] [203][207][193][204][193] [208][193][196] * - [195][207][205][205][207][196][207][210][197] 64 [208][210][207][199][210][193][205] [221]";
  106. 530 PRINT"[173][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][189]":POKEVX,PEEK(VX)OR16:RETURN
  107. 535 IFP=1THENH=1:PRINT"[146]"S$(1):GOTO575
  108. 540 IFH(1)=H(2)THENFORT=1TO2:PRINT"[159]"MID$(S$(T+2),2)H(T)"[157] ":NEXT:GOTO555
  109. 545 IFH(1)>H(2)THENH=1:GOTO555
  110. 550 H=2
  111. 555 IFS(1)=S(2)THENFORT=1TO2:PRINT"[158]"P$(T)S$(T)S(T)"[157] ":NEXT:GOTO580
  112. 560 IFS(1)>S(2)THENW=1:GOTO570
  113. 565 W=2
  114. 570 PRINT"[158]"P$(W)S$(W)S(W)"[157] "
  115. 575 PRINT"[159]"MID$(S$(H+2),2)H(H)"[157] "
  116. 580 PRINTC$(.)"[171][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][179]";
  117. 585 PRINT"[153] #1 =REPLAY[221] #2 = QUIT[221] #1+2 =RESTART "
  118. 590 PRINTLEFT$(N$(.),21)"[153] BUTTONS: "
  119. 595 FORT=.TO333:SYS820:NEXT:IFPEEK(253)=.THEN595
  120. 600 ONPEEK(253)GOTO605,45,610
  121. 605 FORT=1TOP:S(T)=.:P$(T+2)="":NEXT:GOTO50
  122. 610 FORT=1TO2:S(T)=.:P$(T+2)="":H(T)=.:POKEVX+14+T,1:NEXT:GOSUB390:GOTO50
  123. 615 FORT=1TO4:PRINTG$(T):NEXT:PRINTP$(.)"[157][157][157][157][157][157][157][158] TIMER:"MID$(TI$,5);" "
  124. 620 GOTO630
  125. 625 PRINTG$(SP)
  126. 630 POKES+1,12:POKES+4,33:FORT=.TO999:NEXT:POKES+4,.
  127. 635 FORT=1TO4:PRINTF$(T):NEXT:FORT=.TO400:NEXT:RETURN
  128. 640 POKEVX,PEEK(VX)AND239:PRINTG$(.);
  129. 645 PRINT"[146][173][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][189]"
  130. 650 FORT=.TO18:PRINT"[157][148][148]":POKE218,PEEK(648)+128:NEXT:PRINTF$(.);
  131. 655 FORT=.TO18:PRINT"[221]                                      [221]";:NEXT
  132. 660 FORT=1TO4:PRINTF$(T):NEXT:PRINTT$:POKEV,81:POKEV+1,AP(.):POKEV+21,1
  133. 665 PRINT""SPC(14)"[158]PLEASE WAIT!"
  134. 670 POKEVX,PEEK(VX)OR16:GOSUB700
  135. 675 FORT=1TOP:PRINT""P$(T):NEXT
  136. 680 FORT=1TOP:PRINTS$(T)S(T)S$(T+2)H(T):NEXT
  137. 685 PRINTN$(.):POKEVX,PEEK(VX)OR16:RETURN
  138. 690 S=54272:FORT=STOS+24:POKET,.:NEXT
  139. 695 POKES+24,15:POKES+5,003:POKES+6,128:POKES,10::RETURN
  140. 700 FORT=3TOP+2
  141. 705 FORTT=1TO128:P$(T)=P$(T)+N$(RND(1)*4+1):POKEVC,TT:NEXT:NEXT:POKEVC,1
  142. 710 RETURN
  143. 715 DATA15,255,255
  144. 720 DATA31,51,7
  145. 725 DATA63,51,51
  146. 730 DATA127,51,51
  147. 735 DATA255,7,7
  148. 740 DATA127,51,63
  149. 745 DATA63,51,63
  150. 750 DATA31,51,63
  151. 755 DATA15,255,255
  152. 760 DATA162,128,202,224,0,208,251
  153. 765 DATA173,25,212,133,251
  154. 770 DATA173,26,212,133,252
  155. 775 DATA173,1,220
  156. 780 DATA41,12,201,4,208,4,169,2,208,18
  157. 785 DATA201,8,208,4,169,1,208,10
  158. 790 DATA201,0,208,4,169,3,208,2
  159. 795 DATA169,0,133,253
  160. 800 DATA96
  161. 805 GOSUB470:PRINTS$(.);"[212]HE OBJECT OF THIS GAME IS TO DO AS "
  162. 810 PRINT"[145][203]OALA [211]IMON SAYS."
  163. 815 PRINT"[211]IMON WILL PLAY A TUNE FOR YOU. [212]HE
  164. 820 [153]"SONG IS COMPOSED FROM FOUR NOTES. VALACH
  165. 825 PRINT"[145]OF THESE FOUR NOTES IS REPRESENTED BY
  166. 830 [153]"A DIFFERENT COLOUR SQUARE THAT (null)IMON
  167. 835 PRINT"[145]WILL LIGHT AS THE NOTE IS PLAYED.
  168. 840 [153]"(null)HE SONG STARTS OFF ONLY ONE NOTE
  169. 845 PRINT"LONG. [215]ITH EACH TURN YOU TAKE HE WILL
  170. 850 [153]"ONADD ANOTHER NOTE. (null)OU MUST PLAY BACK
  171. 855 PRINT"THE TUNE EXACTLY AS HE PLAYED IT.
  172. 860 [153]" PRESS A BUTTON TO CONTINUE "
  173. 865 [129]T[178].[164]250:[130]
  174. 870 [141]940:[139]BS[178].[167]870
  175. 875 [141]470:[153]S$(.);"(null)O PLAY A NOTE MOVE THE STYLUS
  176. 880 PRINT"[145]VERTICALLY OVER YOUR [203]OALA [208]AD*. [212]HIS
  177. 885 [153]"WILL MOVE THE WHITE ARROW UP AND DOWN.
  178. 890 PRINT"[145][215]HEN THE ARROW IS POINTING TO THE
  179. 895 [153]"COLOURED SQUARE REPRESENTING THE NOTE
  180. 900 PRINT"[145]YOU WISH TO PLAY , PRESS A BUTTON.
  181. 905 [153]"RIGHT$F YOU PLAY A NOTE OUT OF SEQUENCE OR TAKE TOO LONG ";
  182. 910 [153]"THEN IT'S GAME OVER!
  183. 915 PRINT"[211]IMON WILL THEN PLAY BACK THE SONG
  184. 920 [153]"ONTHAT STUMPED YOU.
  185. 925 PRINT" PRESS A BUTTON TO PLAY ":FORT=.TO250:NEXT
  186. 930 GOSUB940:IFBS=.THEN930
  187. 935 GOTO390
  188. 940 FORT=.TO250:NEXT:SYS820:BS=PEEK(253):RETURN
  189. 945 FORT=.TOZ
  190. 950 POKES+1,50:POKES+4,33:FORTT=.TO150:NEXT:POKES+4,.
  191. 955 POKE646,T:PRINTLEFT$(C$(.),8+8*-(PC=2))SPC(17)" ALL TIME HIGH SCORE! "
  192. 960 POKE646,T+6:PRINT""MID$(S$(PC+2),2)H(PC)
  193. 965 FORTT=.TO09:NEXT:NEXT:RETURN
  194. 970 SYS820:IFPEEK(253)THEN970
  195. 975 POKEV+21,.:POKEV+29,.:POKE198,.:PRINT"    [146][147][142]L[207]"CHR$(34)"[139]"CHR$(34)",8"
  196. 980 POKE198,5:POKE631,Z:POKE632,82:POKE633,85:POKE634,78:POKE635,Z:END
  197.